package com.hst.capacity.domain.model.response.setting.price;

import com.hst.capacity.domain.model.entity.setting.line.IntercityLineEntity;
import com.hst.capacity.domain.model.entity.setting.price.ExpressStpPriceEntity;
import com.hst.capacity.domain.model.entity.setting.price.IntercityPriceEntity;
import com.hst.capacity.domain.model.entity.setting.station.StationEntity;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class ExpressStpSearchVO {

    private String idPrice;
    private String regionCode;
    private String idStation;
    private Integer carpoolType;
    private Integer idVehicleType;
    private Integer seats;
    private Integer status;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String createBy;

    private String cityCode;
    private String cityName;
    private String stationName;
    private Double lng;
    private Double lat;

    public ExpressStpSearchVO(ExpressStpPriceEntity priceEntity, StationEntity stationEntity) {
        this.idPrice = priceEntity.getIdServicePriceType();
        this.regionCode = priceEntity.getRegionCode();
        this.idStation = priceEntity.getIdStation();
        this.carpoolType = priceEntity.getCarpoolType();
        this.idVehicleType = priceEntity.getIdVehicleType();
        this.seats = priceEntity.getSeats();
        this.createTime = priceEntity.getCreateTime();
        this.updateTime = priceEntity.getUpdateTime();
        this.createBy = priceEntity.getCreateBy();

        this.cityCode = stationEntity.getCityCode();
        this.cityName = stationEntity.getCityName();
        this.stationName = stationEntity.getName();
        this.lng = stationEntity.getLng();
        this.lat = stationEntity.getLat();
    }

}
